package com.googlecode.adaboost.trainer;

import java.util.Vector;

/**
 * @version Create on 2012-11-11
 * @author Yinzi Chen
 */

public class DataElement implements Comparable<DataElement> {

	private Vector<Double> input;
	private int output;

	@Override
	public int compareTo(DataElement data) {
		for (int i = 0; i < input.size(); ++i) {
			if (input.get(i) > data.input.get(i))
				return 1;
			else if (input.get(i) < data.input.get(i))
				return -1;
		}
		return 0;
	}

	public DataElement(Vector<Double> input, int output) {
		this.input = input;
		this.output = output;
	}

	public Vector<Double> getInput() {
		return input;
	}

	public void setInput(Vector<Double> input) {
		this.input = input;
	}

	public int getOutput() {
		return output;
	}

	public void setOutput(int output) {
		this.output = output;
	}

}
